package com.llh.uua.validation.annotation

import com.llh.uua.validation.PasswordMatchesValidator
import javax.validation.Constraint
import javax.validation.Payload
import kotlin.reflect.KClass

/**
 * 验证密码匹配注解
 *
 * 确认密码字段的值 与 密码字段的值是否相等
 * Created At 2021/3/16 21:17
 * @author llh
 */
@MustBeDocumented
@Constraint(validatedBy = [PasswordMatchesValidator::class])
@Target(AnnotationTarget.TYPE, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
annotation class PasswordMatches(
    val message: String = "Invalid Password",

    val groups: Array<KClass<*>> = [],

    val payload: Array<KClass<out Payload>> = []
)
